﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Classwork03
{
    class Square:Graph
    {
        private string shape;
        private double side;

        public Square(double _side, string _shape) : base(_shape)
        {
            side = _side;
            this.shape = base.shape;
        }

        public override double CalculateArea()
        {
            return side * side;
        }

        public override bool IsLegal()
        {
            if (side > 0 && shape == "Square")
                return true;
            else
                return false;
        }
    }
}
